<?php if  (isset($user)) {
    //echo $ajaxChat->generate('chat1');
    ?>

    
    <h1><?php echo h($user['User']['username']); ?></h1>

    <p><small>Created: <?php echo $user['User']['created']; ?></small></p>

    
    <div class="row-fluid ">
        <div class="span9">
            <?php if((isset($projects))&&(count($projects)>0)){ ?>
                <?php foreach ($projects as $project): ?>
                <div class="row-fluid " style=" margin-bottom: 20px;  margin-top: 20px;">
                    <div class="span12">
                        <div class="span4">
                            <a href="#" class="thumbnail">
                                <img src="http://placehold.it/260x180" alt="">
                            </a>
                        </div>
                        <div class="span8">
                            <div class="caption">
                                <h3>
                                    <?php  echo $this->Html->link($project['Project']['name'],array('controller'=>'projects','action'=>'view',$project['Project']['id'])); ?>
                                </h3>
                                <p>
                                    <?php echo $project['Project']['description']?>
                                </p>
                                <p><a href="#" class="btn btn-primary">Action</a> <a href="#" class="btn">Action</a></p>
                            </div>
                        </div>
                    </div>
                </div>
                <?php endforeach; ?>
            <?php } else {?>
            <div class="alert alert-info">
                Usted no tiene ningun proyecto :'[
            </div>
            <?php } ?>
        </div>
        
        
        <div class="span3 bs-docs-sidebar">
<!--            <ul class="nav nav-list bs-docs-sidenav affix">
                <li><a href="#dropdowns"><i class="icon-chevron-right"></i> Dropdowns</a></li>
                <li><a href="#buttonGroups"><i class="icon-chevron-right"></i> Button groups</a></li>
                <li><a href="#buttonDropdowns"><i class="icon-chevron-right"></i> Button dropdowns</a></li>
                <li><a href="#navs"><i class="icon-chevron-right"></i> Navs</a></li>
                <li class="active"><a href="#navbar"><i class="icon-chevron-right"></i> Navbar</a></li>
                <li class=""><a href="#breadcrumbs"><i class="icon-chevron-right"></i> Breadcrumbs</a></li>
                <li class=""><a href="#pagination"><i class="icon-chevron-right"></i> Pagination</a></li>
                <li class=""><a href="#labels-badges"><i class="icon-chevron-right"></i> Labels and badges</a></li>
                <li class=""><a href="#typography"><i class="icon-chevron-right"></i> Typography</a></li>
                <li class=""><a href="#thumbnails"><i class="icon-chevron-right"></i> Thumbnails</a></li>
                <li class=""><a href="#alerts"><i class="icon-chevron-right"></i> Alerts</a></li>
                <li class=""><a href="#progress"><i class="icon-chevron-right"></i> Progress bars</a></li>
                <li class=""><a href="#misc"><i class="icon-chevron-right"></i> Misc</a></li>
            </ul>-->
        </div>
        
    </div>

            
            
    
    <?php if((isset($orgs))&&(count($orgs)>0)){ ?>

    <p><?php echo h(count($orgs)); ?></p>
    <table>
    <?php foreach ($orgs as $org): ?>
        <tr>
            <td> <?php
                echo $this->Html->link($org['Organization']['name'],array('controller'=>'organizations','action'=>'view',$org['Organization']['id'])); 
                ?>
            </td>
            <td>
                <?php 
                //echo $this->Html->link($user['User']['username'],array('controller' => 'users', 'action' => 'view', $user['User']['id'])); 
                ?>
            </td>
            <td><?php
            //echo $user['User']['created'];
            ?></td>
        </tr>
    <?php endforeach; ?>
    </table>
    <?php }
    
} else {?>
    <div class="alert alert-info">
        Error de acceso.
    </div>
<?php } ?>
